<%@ page language="java" import="java.io.*, com.erclab.internal.xpresso.htmlgeneration.*" %>

<%@ page isErrorPage="true" %>

<%  // -----------------------------------------------------------
    // This page Collects and stores errors generated in the 
    // application
    // -----------------------------------------------------------

    String exceptionOcurred = exception.toString();
    String exceptionMessage = exception.getMessage();

    if (exceptionMessage != null){
        exceptionMessage = exceptionMessage.replaceAll("'", "");
        exceptionMessage = exceptionMessage.replaceAll("\"", "");
    }

    String stackTrace;

    StringWriter sout = new StringWriter();
    PrintWriter pout = new PrintWriter(sout);
    exception.printStackTrace(pout);
    stackTrace = sout.toString();
    
    String ip = request.getRemoteAddr();

    String netId = (String)session.getAttribute("netId");

    // Store the error on the database
    ErrorTracking myError = new ErrorTracking();

    myError.addNewError(exceptionOcurred, exceptionMessage, stackTrace, ip, netId);
%>


<html><!-- InstanceBegin template="/Templates/gedas_template.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<head>
<title>Finance Automated Calculation Tool - gedas USA</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="../html/css/Styles_gedas.css" rel="stylesheet" type="text/css">
<meta name="Author" content="Enrique Rodriguez">
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="740" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table width="740" border="0" cellpadding="0" cellspacing="0">
      <tr valign="bottom">
        <td colspan="2" bgcolor="#003366"><img src="../html/images/Top/Top1.gif" width="544" height="24"></td>
        </tr>
      <tr>
        <td height="6" valign="top" bgcolor="#FF0000"><img src="../html/images/Top/Top2.gif" width="544" height="24"></td>
        <td width="200" rowspan="2"><table width="100%" height="55" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center"><img src="../html/images/Gedas_logo_web.gif" width="140" height="41"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="20" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="37%" rowspan="2"><a href="/jsp-app/default.jsp"><img src="../html/images/Top/HomeDown.gif" width="76" height="29" border="0"></a></td>
              <td width="18%" rowspan="2"><a href="/jsp-app/Reporting.htm"><img src="../html/images/Top/ReportingDown.gif" width="115" height="29" border="0"></a></td>
              <td rowspan="2"><a href="/jsp-app/Administration.htm"><img src="../html/images/Top/AdminDown.gif" width="82" height="29" border="0"></a></td>
              <td width="26%" height="8
			  "><img src="../html/images/Top/ShadowLine.gif" width="271" height="8"></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
        </table></td>
        </tr>
    </table>
      <table width="740"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="right">&nbsp;  </td>
        </tr>
      </table>
      <table width="740" border="0" cellspacing="0" cellpadding="0">
        <tr valign="top" background="../html/images/Str_BackgroundTop.gif">
          <td width="19" height="27" align="left" background="../html/images/Str_BackgroundLeft.gif"><img src="../html/images/Str_CornetTopLeft.gif" width="19" height="27"></td>
          <td width="99%" height="27" background="../html/images/Str_BackgroundTop.gif"><!-- InstanceBeginEditable name="PageIcon" --> 
                            <img src="../html/images/gRAD/ErrorImage.gif">
                            <!-- InstanceEndEditable --></td>
          <td width="19" height="27" align="right" background="../html/images/Str_BackgroundRight.gif"><img src="../html/images/Str_TopRightCornet.gif" width="19" height="27"></td>
        </tr>
        <tr>
          <td width="19" background="../html/images/Str_BackgroundLeft.gif">&nbsp;          </td>
          <td><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" class="IndividualReport">
            <tr>
              <td align="center"><strong> <!-- InstanceBeginEditable name="PageTitle" --><!-- InstanceEndEditable --> </strong> </td>
            </tr>
            <tr>
              <td align="center"> <!-- InstanceBeginEditable name="PageDescription" --> 
                                  &nbsp;
                                  <!-- InstanceEndEditable --> </td>
            </tr>
            <tr>
              <td>
                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="140" valign="top">
                      <table width="95%"  border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="8"><img src="../html/images/OptionsBox/UpLeftCorner.gif" width="8" height="8"></td>
                          <td background="../html/images/OptionsBox/UpBackground.gif"></td>
                          <td width="7" align="right"><img src="../html/images/OptionsBox/UpRightCorner.gif" width="7" height="8"></td>
                        </tr>
                        <tr>
                          <td width="8" background="../html/images/OptionsBox/RightBackground.gif">&nbsp;</td>
                          <td bgcolor="#FFFFF0"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td class="OptionsBox">Options:</td>
                              </tr>
                              <tr>
                                <td><!-- InstanceBeginEditable name="Options" --><table width="75%" border="0" cellpadding="0" cellspacing="0" class="ExplanationText">
                                      <tr> 
                                        <td width="16%" height="28"><img src="../html/images/gRAD/ArrowOption.gif"></td>
                                        <td width="84%"><a href="javascript:history.go(-1)"><font class="fontOptions">Go 
                                          Back</font></a></td>
                                      </tr>
                                    </table>
                                  <!-- InstanceEndEditable --></td>
                              </tr>
                          </table></td>
                          <td width="7" align="right" background="../html/images/OptionsBox/LeftBackground.gif">&nbsp;</td>
                        </tr>
                        <tr>
                          <td width="8"><img src="../html/images/OptionsBox/downLeftCorner.gif" width="8" height="9"></td>
                          <td background="../html/images/OptionsBox/DownBackground.gif"></td>
                          <td width="7" align="right"><img src="../html/images/OptionsBox/DownRigthCorner.gif" width="7" height="9"></td>
                        </tr>
                      </table>
                      </td>
                    <td width="*"><!-- InstanceBeginEditable name="PageContent" --> 
                        <table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td align="center">

                              <p><strong>System message:
                                  <br>
                              </strong>                                <%= exceptionMessage %>
                              <img src="../html/images/gRAD/Spacer.gif" onLoad="if (parent.errorGenerated) parent.errorGenerated('<%=exceptionMessage%>');"></p>
                              <pre><b>

</b></pre>
<p> 
<!-- 
EXCEPTION OCURRED:
<%= exceptionOcurred %>

----------------------------- 
ERROR STACK
-----------------------------
<%=stackTrace%> 
-----------------------------
END ERROR STACK
-----------------------------
-->
</td>
                          </tr>
                        </table>
                        <p>&nbsp;</p>
                      <!-- InstanceEndEditable --></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
          </table></td>
          <td width="19" background="../html/images/Str_BackgroundRight.gif">&nbsp;</td>
        </tr>

        <tr>
          <td colspan="3"><!-- InstanceBeginEditable name="CusomZone" --> <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="19" valign="top" background="../html/images/Str_BackgroundLeft.gif">&nbsp;</td>
              <td>&nbsp;</td>
              <td width="19" align="right" valign="top" background="../html/images/Str_BackgroundRight.gif">&nbsp;</td>
            </tr>
          </table><!-- InstanceEndEditable --></td>
        </tr>
        <tr>
          <td width="19" align="left" background="../html/images/Str_BackgroundBottom.gif"><img src="../html/images/Str_BottomLeftCorner.gif" width="19" height="18"></td>
          <td align="right" background="../html/images/Str_BackgroundBottom.gif"><img src="../html/images/Str_gedas.gif" width="183" height="18"></td>
          <td width="19" align="right" background="../html/images/Str_BackgroundBottom.gif"><img src="../html/images/Str_BottomRightCorner.gif" width="19" height="18"></td>
        </tr>
      </table>    </td>
  </tr>
  <tr>
    <td valign="bottom"><br>
      <table width="740" height="25" border="0" cellpadding="0" cellspacing="0" bgcolor="#003063">
        <tr>
          <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="PageBottom">
            <tr>
              <td width="55" align="center">&nbsp;</td>
              <td align="center">gedas USA 2004 - Finance Automated Calculation Tool <BR>
      Production release: 1.3.4 - <a href="../jsp-app/About.htm"><font color="#FFFFFF">About this release</font></a></td>
              <td width="55" align="center"><a href="../Tutorial/html/index.htm" target="_blank"><img src="../html/images/Button_Help.gif" alt="gFACT Help pages" width="49" height="17" border="0"></a></td>
            </tr>
          </table></td>
        </tr>
      </table></td>
  </tr>
</table>

</body>
<!-- InstanceEnd --></html>
